package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CommodityMapper;
import com.ruoyi.system.domain.Commodity;
import com.ruoyi.system.service.ICommodityService;

/**
 * 代拿商品Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-06-17
 */
@Service
public class CommodityServiceImpl implements ICommodityService 
{
    @Autowired
    private CommodityMapper commodityMapper;

    /**
     * 查询代拿商品
     * 
     * @param comId 代拿商品ID
     * @return 代拿商品
     */
    @Override
    public Commodity selectCommodityById(Integer comId)
    {
        return commodityMapper.selectCommodityById(comId);
    }

    /**
     * 查询代拿商品列表
     * 
     * @param commodity 代拿商品
     * @return 代拿商品
     */
    @Override
    public List<Commodity> selectCommodityList(Commodity commodity)
    {
        return commodityMapper.selectCommodityList(commodity);
    }

    /**
     * 新增代拿商品
     * 
     * @param commodity 代拿商品
     * @return 结果
     */
    @Override
    public int insertCommodity(Commodity commodity)
    {
        return commodityMapper.insertCommodity(commodity);
    }

    /**
     * 修改代拿商品
     * 
     * @param commodity 代拿商品
     * @return 结果
     */
    @Override
    public int updateCommodity(Commodity commodity)
    {
        return commodityMapper.updateCommodity(commodity);
    }

    /**
     * 批量删除代拿商品
     * 
     * @param comIds 需要删除的代拿商品ID
     * @return 结果
     */
    @Override
    public int deleteCommodityByIds(Integer[] comIds)
    {
        return commodityMapper.deleteCommodityByIds(comIds);
    }

    /**
     * 删除代拿商品信息
     * 
     * @param comId 代拿商品ID
     * @return 结果
     */
    @Override
    public int deleteCommodityById(Integer comId)
    {
        return commodityMapper.deleteCommodityById(comId);
    }
}
